package com.yanqu.road.logic.bussiness.monopolymarket;

import com.yanqu.road.dao.impl.TempDao;
import com.yanqu.road.dao.impl.nenmonopolymarket.NewMonopolyMarketResConfigDaoImpl;
import com.yanqu.road.entity.monopolymarket.MonopolyMarketNoticeData;
import com.yanqu.road.entity.monopolymarket.MonopolyMarketUserData;
import com.yanqu.road.entity.monopolymarket.config.MonopolyMarketBackEndConfig;
import com.yanqu.road.entity.monopolymarket.config.MonopolyMarketCrossConfig;
import com.yanqu.road.entity.monopolymarket.fortress.MonopolyMarketFortressRankData;
import com.yanqu.road.entity.monopolymarket.fortress.MonopolyMarketFortressRewardData;
import com.yanqu.road.entity.monopolymarket.fortress.MonopolyMarketFortressUnionData;
import com.yanqu.road.entity.monopolymarket.fortress.MonopolyMarketFortressUserData;
import com.yanqu.road.entity.monopolymarket.group.MonopolyMarketBackEndGroup;
import com.yanqu.road.entity.monopolymarket.group.MonopolyMarketCrossGroup;
import com.yanqu.road.entity.monopolymarket.group.MonopolyMarketServerGroup;
import com.yanqu.road.entity.monopolymarket.office.MonopolyMarketOfficeFinishData;
import com.yanqu.road.entity.monopolymarket.office.MonopolyMarketOfficeSeatData;
import com.yanqu.road.entity.monopolymarket.resgrab.MonopolyMarketReportData;
import com.yanqu.road.entity.monopolymarket.resgrab.MonopolyMarketResGrabFinishData;
import com.yanqu.road.entity.monopolymarket.resgrab.MonopolyMarketResGrabPointData;
import com.yanqu.road.entity.systemgroup.newmonopolymarket.config.NewMonopolyMarketResConfigData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class NewMonopolyMarketBussiness extends TempDao {

    public static boolean updateMonopolyMarketUserData(MonopolyMarketUserData item) {
        return DaoHelper.getMonopolyMarketUserDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketUserData(MonopolyMarketUserData item) {
        return DaoHelper.getMonopolyMarketUserDataDaoImpl().add(item);
    }

    // 榷署 MonopolyMarketReportData
    public static List<MonopolyMarketReportData> getMonopolyMarketReportDataList(long userId, int type, int startTime, int limit) {
        return DaoHelper.getMonopolyMarketReportDataDaoImpl().getMonopolyMarketReportDataList(userId,type,startTime, limit);
    }

    public static boolean updateMonopolyMarketReportData(MonopolyMarketReportData item) {
        return DaoHelper.getMonopolyMarketReportDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketReportData(MonopolyMarketReportData item) {
        return DaoHelper.getMonopolyMarketReportDataDaoImpl().add(item);
    }

    // MonopolyMarketOfficeSeatData  按index 顺序加载
    public static List<MonopolyMarketOfficeSeatData> getMonopolyMarketOfficeSeatInfoList(long groupId, int startIndex) {
        return DaoHelper.getMonopolyMarketOfficeSeatDataDaoImpl().getMonopolyMarketOfficeSeatData(groupId,startIndex);
    }

    public static boolean updateMonopolyMarketOfficeSeatData(MonopolyMarketOfficeSeatData item) {
        return DaoHelper.getMonopolyMarketOfficeSeatDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketOfficeSeatData(MonopolyMarketOfficeSeatData item) {
        return DaoHelper.getMonopolyMarketOfficeSeatDataDaoImpl().add(item);
    }

    // MonopolyMarketNoticeData
    public static List<MonopolyMarketNoticeData> getMonopolyMarketNoticeDataList(long groupId,int type, int time, int num) {
        return DaoHelper.getMonopolyMarketNoticeDaoImpl().getMonopolyMarketNoticeDataList(groupId,type,time,num);
    }

    public static boolean addMonopolyMarketNoticeData(MonopolyMarketNoticeData item) {
        return DaoHelper.getMonopolyMarketNoticeDaoImpl().add(item);
    }

    // point
    public static Map<Integer,MonopolyMarketResGrabPointData> getMonopolyMarketResGrabPointDataMap(long groupId,int type) {
        return DaoHelper.getMonopolyMarketResGrabPointDataDaoImpl().getMonopolyMarketResGrabPointDataMap(groupId,type);
    }

    public static boolean updateMonopolyMarketResGrabPointDataList(List<MonopolyMarketResGrabPointData> list) {
        return DaoHelper.getMonopolyMarketResGrabPointDataDaoImpl().batchUpdate(list);
    }

    public static boolean addMonopolyMarketResGrabPointDataList(List<MonopolyMarketResGrabPointData> list) {
        return DaoHelper.getMonopolyMarketResGrabPointDataDaoImpl().batchAdd(list);
    }

    // MonopolyMarketResGrabFinishData
    public static List<MonopolyMarketResGrabFinishData> getMonopolyMarketResGrabFinishDataList() {
        return DaoHelper.getMonopolyMarketResGrabFinishDataDaoImpl().getMonopolyMarketResGrabFinishDataList();
    }

    public static boolean updateMonopolyMarketResGrabFinishData(MonopolyMarketResGrabFinishData item) {
        return DaoHelper.getMonopolyMarketResGrabFinishDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketResGrabFinishData(MonopolyMarketResGrabFinishData item) {
        return DaoHelper.getMonopolyMarketResGrabFinishDataDaoImpl().add(item);
    }

    // MonopolyMarketOfficeFinishData
    public static Map<Long,MonopolyMarketOfficeFinishData> getMonopolyMarketOfficeFinishDataMap() {
        return DaoHelper.getMonopolyMarketOfficeFinishDaoImpl().getMonopolyMarketOfficeFinishDataMap();
    }

    public static boolean updateMonopolyMarketOfficeFinishData(MonopolyMarketOfficeFinishData item) {
        return DaoHelper.getMonopolyMarketOfficeFinishDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketOfficeFinishData(MonopolyMarketOfficeFinishData item) {
        return DaoHelper.getMonopolyMarketOfficeFinishDaoImpl().add(item);
    }

    // MonopolyMarketCrossGroup
    public static Map<Long,MonopolyMarketCrossGroup> getMonopolyMarketCrossGroupMap(int channelId) {
        return DaoHelper.getMonopolyMarketCrossGroupDaoImpl().getMonopolyMarketCrossGroupMap(channelId);
    }

    public static boolean addMonopolyMarketCrossGroup(MonopolyMarketCrossGroup item) {
        return DaoHelper.getMonopolyMarketCrossGroupDaoImpl().add(item);
    }

    public static boolean updateMonopolyMarketCrossGroup(MonopolyMarketCrossGroup item) {
        return DaoHelper.getMonopolyMarketCrossGroupDaoImpl().update(item);
    }

    // MonopolyMarketServerGroup
    public static MonopolyMarketServerGroup getMonopolyMarketServerGroup(long serverId) {
        return DaoHelper.getMonopolyMarketServerGroupDaoImpl().getMonopolyMarketServerGroup(serverId);
    }

    public static boolean updateMonopolyMarketServerGroup(MonopolyMarketServerGroup item) {
        return DaoHelper.getMonopolyMarketServerGroupDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketServerGroup(MonopolyMarketServerGroup item) {
        return DaoHelper.getMonopolyMarketServerGroupDaoImpl().add(item);
    }

    // MonopolyMarketCrossConfig
    public static MonopolyMarketCrossConfig getMonopolyMarketCrossConfig(int channelId) {
        return DaoHelper.getMonopolyMarketCrossConfigDaoImpl().getMonopolyMarketCrossConfig(channelId);
    }

    public static boolean updateMonopolyMarketCrossConfig(MonopolyMarketCrossConfig item) {
        return DaoHelper.getMonopolyMarketCrossConfigDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketCrossConfig(MonopolyMarketCrossConfig item) {
        return DaoHelper.getMonopolyMarketCrossConfigDaoImpl().add(item);
    }

    public static long getMaxResGrabFinishId(){
        return DaoHelper.getMonopolyMarketResGrabFinishDataDaoImpl().getMaxRecordId();
    }

    public static long getMaxOfficeFinishId(){
        return DaoHelper.getMonopolyMarketOfficeFinishDaoImpl().getMaxId();
    }



    // config
    public static List<NewMonopolyMarketResConfigData> getMonopolyMarketResConfigDataList() {
        return new NewMonopolyMarketResConfigDaoImpl().getMonopolyMarketResConfigDataList();
    }

    // MonopolyMarketBackEndConfig
    public static MonopolyMarketBackEndConfig getMonopolyMarketBackEndConfig(int channelId) {
        return DaoHelper.getMonopolyMarketBackEndConfigDaoImpl().getMonopolyMarketBackEndConfig(channelId);
    }

    // MonopolyMarketBackEndGroup
    public static List<MonopolyMarketBackEndGroup> getMonopolyMarketBackEndGroupList(int channelId) {
        return DaoHelper.getMonopolyMarketBackEndGroupDaoImpl().getMonopolyMarketBackEndGroupList(channelId);
    }

    // 要塞
    // MonopolyMarketFortressUserData
    public static List<MonopolyMarketFortressUserData> getMonopolyMarketFortressUserDataList(long groupId,int weekId) {
        return DaoHelper.getMonopolyMarketFortressUserDataDaoImpl().getMonopolyMarketFortressUserDataList(groupId,weekId);
    }

    public static boolean updateMonopolyMarketFortressUserData(MonopolyMarketFortressUserData item) {
        return DaoHelper.getMonopolyMarketFortressUserDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketFortressUserData(MonopolyMarketFortressUserData item) {
        return DaoHelper.getMonopolyMarketFortressUserDataDaoImpl().add(item);
    }

    // MonopolyMarketFortressUnionData
    public static List<MonopolyMarketFortressUnionData> getMonopolyMarketFortressUnionDataList(long groupId, int weekId) {
        return DaoHelper.getMonopolyMarketFortressUnionDataDaoImpl().getMonopolyMarketFortressUnionDataList(groupId,weekId);
    }

    public static boolean updateMonopolyMarketFortressUnionData(MonopolyMarketFortressUnionData item) {
        return DaoHelper.getMonopolyMarketFortressUnionDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketFortressUnionData(MonopolyMarketFortressUnionData item) {
        return DaoHelper.getMonopolyMarketFortressUnionDataDaoImpl().add(item);
    }

    // MonopolyMarketFortressRankData
    public static List<MonopolyMarketFortressRankData> getMonopolyMarketFortressRankData(long groupId, int weekId) {
        return DaoHelper.getMonopolyMarketFortressRankDataDaoImpl().getMonopolyMarketFortressRankData(groupId,weekId);
    }

    public static boolean updateMonopolyMarketFortressRankData(MonopolyMarketFortressRankData item) {
        return DaoHelper.getMonopolyMarketFortressRankDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketFortressRankData(MonopolyMarketFortressRankData item) {
        return DaoHelper.getMonopolyMarketFortressRankDataDaoImpl().add(item);
    }

    // MonopolyMarketFortressRewardData
    public static List<MonopolyMarketFortressRewardData> getMonopolyMarketFortressRewardDataList() {
        return DaoHelper.getMonopolyMarketFortressRewardDataDaoImpl().getMonopolyMarketFortressRewardDataList();
    }

    public static boolean updateMonopolyMarketFortressRewardData(MonopolyMarketFortressRewardData item) {
        return DaoHelper.getMonopolyMarketFortressRewardDataDaoImpl().update(item);
    }

    public static boolean addMonopolyMarketFortressRewardData(MonopolyMarketFortressRewardData item) {
        return DaoHelper.getMonopolyMarketFortressRewardDataDaoImpl().add(item);
    }


}